﻿namespace Mocking.Evaluation
{
    public class Manager
    {
        private readonly ILogger _logger;
        private readonly IRepository _repository;

        public Manager(IRepository repository, ILogger logger)
        {
            _repository = repository;
            _logger = logger;
        }

        public bool Delete(string thingToDelete)
        {
            bool successfull = _repository.Delete(thingToDelete);

            if (successfull)
                _logger.Log("The thing was deleted");

            return successfull;
        }
        public bool Save(string thingToSave)
        {
            bool successfull = _repository.Save(thingToSave);

            if (successfull)
                _logger.Log("The thing was saved");

            return successfull;
        }
    }
}